<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>上传头像</title>
    <link rel="stylesheet" th:replace="base::styles"/>
</head>
<body>
<div th:replace="base::nav-bar"></div>

<div class="row">
    <div class="col-lg-5"></div>
    <div class="col-lg-2 text-center">
        <img th:src="${person.avatar}" style="width: 200px;height: 200px;"/>

        <form action="/person/avatar" method="post" enctype="multipart/form-data">
            <input type="hidden" name="id" th:value="${person.id}"/>
            <div class="form-group">
                <input type="file" name="avatar" class="form-control" accept="image/*"/>
            </div>
            <button type="submit" class="btn btn-success">上传</button>
        </form>
    </div>
    <div class="col-lg-5"></div>
</div>
<div th:replace="base::scripts"></div>
</body>
</html>